package com.sjp.myspring.beans;

import lombok.Data;

@Data
public class JPBeanWrapper {

    private Object wrappedInstance;
    private Class<?> wrappedClass;

    public JPBeanWrapper(Object instance) {
        this.wrappedInstance = instance;
        this.wrappedClass = instance.getClass();
    }

    /**
     * Return the bean instance wrapped by this object.
     */
    public Object getWrappedInstance() {
        return wrappedInstance;
    }

    /**
     * Return the type of the wrapped bean instance.
     */
    public Class<?> getWrappedClass() {
        return wrappedClass;
    }
}
